<?php


namespace app\api\validate;


use think\Validate;

class FileType extends Validate
{
    /**
     * @var string[] 验证规则
     */
    protected $rule = [
        'name' => 'require',
        'id' => 'require'
    ];

    /**
     * @var string[] 验证不同过的错误提示
     */
    protected $message = [
        'name.require' => '类别名称不能为空!',
        'id.require' => '类别ID不能为空!'
    ];

    /**
     * @var \string[][] 验证场景
     */
    protected $scene = [
        'add' => ['require'],
        'edit' => ['id', 'name'],
        'detail' => ['id'],
        'del' => ['id']
    ];
}